<html>
<head>
  <title>socket.io protocol</title>
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  <style>
    body, td {
      font-family: Tahoma;
      font-size: 10pt;
    }
  </style>
</head>
<body>
<a name="4117"/>

<div>
<div><div style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:30px;padding-right:30px;padding-bottom:30px;padding-left:30px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;display:block;line-height:1.6;background-color:rgb(255, 255, 255);border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(202, 202, 202);border-right-color:rgb(202, 202, 202);border-bottom-color:rgb(202, 202, 202);border-left-color:rgb(202, 202, 202);font-family:Helvetica, arial, freesans, clean, sans-serif;margin:0px;position:relative;opacity:1;filter:none;color:rgb(51, 51, 51);"><p style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">The present document describes the protocol and encoding a client/server pair
must follow to establish a successful Socket.IO connection.</p>

<h2 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:1px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:24px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;border-bottom-style:solid;border-bottom-color:rgb(204, 204, 204);color:rgb(0, 0, 0);">Protocol versions</h2>

<p style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">The present document describes the latest version of the protocol, <strong style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;font-weight:bold;">1</strong>.</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Versions are a single integer incremented with each revision of the protocol.</p>

<h2 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:1px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:24px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;border-bottom-style:solid;border-bottom-color:rgb(204, 204, 204);color:rgb(0, 0, 0);">Overview</h2>

<p style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Socket.IO aims to bring a WebSocket-like API to many browsers and devices, with
some specific features to help with the creation of real-world realtime
applications and games.</p>

<ul style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:30px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;"><li style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Multiple transport support (old user agents, mobile browsers, etc).</li><li style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Multiple sockets under the same connection (namespaces).</li><li style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Disconnection detection through heartbeats.</li><li style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Optional acknoledgments.</li><li style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Reconnection support with buffering (ideal for mobile devices or bad networks)</li><li style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Lightweight protocol that sits on top of HTTP.</li></ul><h3 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;">Anatomy of a Socket.IO socket</h3>

<p style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">A Socket.IO client first decides on a transport to utilize to connect. </p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">The state of the Socket.IO socket can be <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">disconnected</code>, <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">disconnecting</code>,
<code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">connected</code> and <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">connecting</code>.</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">The transport connection can be <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">closed</code>, <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">closing</code>, <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">open</code>, and <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">opening</code>.</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">A simple HTTP handshake takes place at the beginning of a Socket.IO connection.
The handshake, if successful, results in the client receiving:</p>

<ul style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:30px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;"><li style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">A session id that will be given for the transport to open connections.</li><li style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">A number of seconds within which a heartbeat is expected (<code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">heartbeat
timeout</code>)</li><li style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">A number of seconds after the transport connection is closed when the socket
is considered disconnected if the transport connection is not reopened (<code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">close
timeout</code>).</li></ul><p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">At this point the socket is considered connected, and the transport is signaled
to open the connection.</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">If the transport connection is closed, both ends are to buffer messages and
then frame them appropriately for them to be sent as a batch when the
connection resumes.</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">If the connection is not resumed within the negotiated timeout the socket is
considered disconnected. At this point the client might decide to reconnect the
socket, which implies a new handshake.</p>

<h2 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:1px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:24px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;border-bottom-style:solid;border-bottom-color:rgb(204, 204, 204);color:rgb(0, 0, 0);">Socket.IO HTTP requests</h2>

<p style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Socket.IO HTTP URIs take the form of:</p>

<pre style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:6px;padding-right:10px;padding-bottom:6px;padding-left:10px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:13px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:19px;background-color:rgb(248, 248, 248);border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);overflow-x:auto;overflow-y:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;"><code style="background-image:initial;background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:pre;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-width:initial;background-attachment:initial;background-position-x:initial;background-position-y:initial;background-origin:initial;background-clip:initial;">[scheme] '://' [host] '/' [namespace] '/' [protocol version] '/' [transport id] '/' [session id] '/' ( '?' [query] )
</code></pre>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Only the methods <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">GET</code> and <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">POST</code> are utilized (for the sake of compatibility
with old user agents), and their usage varies according to each transport.</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">The main transport connection is always a <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">GET</code> request.</p>

<h3 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;">URI scheme</h3>

<p style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">The URI scheme is decided based on whether the client requires a secure connection
or not. Defaults to <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">http</code>, but <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">https</code> is the recommended one.</p>

<h3 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;">URI host</h3>

<p style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">The host where the Socket.IO server is located. In the browser environment, it
defaults to the host that runs the page where the client is loaded (<code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">location.host</code>)</p>

<h3 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;">Namespace</h3>

<p style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">The connecting client has to provide the namespace where the Socket.IO requests
are intercepted.</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">This defaults to <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">socket.io</code> for all client and server distributions.</p>

<h3 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;">Protocol version</h3>

<p style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Each client should ship with the revision ID it supports, available as a public
interface to developers.</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">For example, the browser client supports <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">io.protocolVersion</code>.</p>

<h3 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;">Transport ID</h3>

<p style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">The following transports are supported:</p>

<ul style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:30px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;"><li style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:100%;font:inherit;"><code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">xhr-polling</code></li><li style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:100%;font:inherit;"><code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">xhr-multipart</code></li><li style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:100%;font:inherit;"><code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">htmlfile</code></li><li style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:100%;font:inherit;"><code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">websocket</code></li><li style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:100%;font:inherit;"><code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">flashsocket</code></li><li style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:100%;font:inherit;"><code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">jsonp-polling</code></li></ul><p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">The client first figures out what transport to use. Usually this occurs in the
browser, utilizing <a href="http://mzl.la/6tm7Aj" shape="rect" style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;color:rgb(65, 131, 196);text-decoration:none;">feature detection</a>.</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">User-defined transports are allowed.</p>

<h3 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;">Query</h3>

<p style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">The query component (eg: <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">?token=48737481747&amp;</code>) is not present on all URLs. 
Certain query keys are reserved by Socket.IO:</p>

<ul style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:30px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;"><li style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">
<code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">t</code>: Contains a timestamp, only used to bypass caching on certain old UAs.</li><li style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">
<code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">disconnect</code>: Triggers a disconnection.</li></ul><p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">User-defined query components are allowed. For example,
<code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">?t=1238141910&amp;token=mytoken</code> is a valid query).</p>

<h2 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:1px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:24px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;border-bottom-style:solid;border-bottom-color:rgb(204, 204, 204);color:rgb(0, 0, 0);">Handshake</h2>

<p style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">The client will perform an initial HTTP POST request like the following</p>

<pre style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:6px;padding-right:10px;padding-bottom:6px;padding-left:10px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:13px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:19px;background-color:rgb(248, 248, 248);border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);overflow-x:auto;overflow-y:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;"><code style="background-image:initial;background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:pre;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-width:initial;background-attachment:initial;background-position-x:initial;background-position-y:initial;background-origin:initial;background-clip:initial;">http://example.com/socket.io/1/
</code></pre>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">The absence of the <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">transport id</code> and <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">session id</code> segments will signal the server
this is a new, non-handshaken connection.</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">The server can respond in three different ways:</p>

<ul style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:30px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;"><li style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">401 Unauthorized</li></ul><p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">If the server refuses to authorize the client to connect, based on the supplied
  information (eg: <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">Cookie</code> header or custom query components).</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">No response body is required.</p>

<ul style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:30px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;"><li style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">503 Service Unavailable</li></ul><p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">If the server refuses the connection for any reason (eg: overload).</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">No response body is required.</p>

<ul style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:30px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;"><li style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">200 OK</li></ul><p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">The handshake was successful.</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">The body of the response should contain the session id (<code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">sid</code>) given to the
  client, followed by the heartbeat timeout, the connection closing timeout,
  and the list of supported transports separated by <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">:</code></p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">The absence of a heartbeat timeout ('') is interpreted as the server and
  client not expecting heartbeats.</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">For example <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">4d4f185e96a7b:15:10:websocket,xhr-polling</code>.</p>

<h2 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:1px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:24px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;border-bottom-style:solid;border-bottom-color:rgb(204, 204, 204);color:rgb(0, 0, 0);">Transport connection</h2>

<p style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Once the handshake request-response cycle is complete (and it ended with success),
a new connection is opened by the transport that was negotiated, with a <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">GET</code>
HTTP request.</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">The transport <em style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;font-style:italic;">can</em> modify the URI if the transport requires it, as long as no
information is lost. For example, if <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">websocket</code> is accepted as the transport,
and the connection was secure, the URI for the transport connection will become:</p>

<pre style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:6px;padding-right:10px;padding-bottom:6px;padding-left:10px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:13px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:19px;background-color:rgb(248, 248, 248);border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);overflow-x:auto;overflow-y:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;"><code style="background-image:initial;background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:pre;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-width:initial;background-attachment:initial;background-position-x:initial;background-position-y:initial;background-origin:initial;background-clip:initial;">wss://example.com/socket.io/1/websocket/4d4f185e96a7b
</code></pre>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">The URI still contains all the information required by Socket.IO to continue the
message exchange (protocol security, namespace, protocol version, transport, etc).</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Messages can be sent and received by following this convention. <strong style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;font-weight:bold;">How</strong> the messages
are encoded and framed depends on each transport, but generally boils down to
whether the transport has built-in framing (unidiretionally and/or bidirectionally).</p>

<h3 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;">Unidirectional transports</h3>

<p style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Transports that initialize unidirectional connections (where the server can
write to the client but not vice-versa), should perform <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">POST</code> requests to send
data back to the server to the same endpoint URI.</p>

<h2 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:1px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:24px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;border-bottom-style:solid;border-bottom-color:rgb(204, 204, 204);color:rgb(0, 0, 0);">Messages</h2>

<h3 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;">Framing</h3>

<p style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Certain transports, like <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">websocket</code> or <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">flashsocket</code>, have built-in lightweight
framing mechanisms for sending and receiving messages.</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">For <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">xhr-multipart</code>, the built-in MIME framing is used for the sake of consistency.</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">When no built-in lightweight framing is available, and multiple messages need to be
delivered (i.e: buffered messages), the following is used:</p>

<pre style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:6px;padding-right:10px;padding-bottom:6px;padding-left:10px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:13px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:19px;background-color:rgb(248, 248, 248);border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);overflow-x:auto;overflow-y:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;"><code style="background-image:initial;background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:pre;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-width:initial;background-attachment:initial;background-position-x:initial;background-position-y:initial;background-origin:initial;background-clip:initial;">`\ufffd` [message lenth] `\ufffd`
</code></pre>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Transports where the framing overhead is expensive (ie: when the xhr-polling
transport tries to send data to the server).</p>

<h3 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;">Encoding</h3>

<p style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Messages have to be encoded before they're sent. The structure of a message is
as follows:</p>

<pre style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:6px;padding-right:10px;padding-bottom:6px;padding-left:10px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:13px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:19px;background-color:rgb(248, 248, 248);border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);overflow-x:auto;overflow-y:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;"><code style="background-image:initial;background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:pre;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-width:initial;background-attachment:initial;background-position-x:initial;background-position-y:initial;background-origin:initial;background-clip:initial;">[message type] ':' [message id ('+')] ':' [message endpoint] (':' [message data]) 
</code></pre>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">The message type is a single digit integer.</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">The message id is an incremental integer, required for ACKs (can be ommitted).
If the message id is followed by a <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">+</code>, the ACK is not handled by socket.io,
but by the user instead.</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Socket.IO has built-in support for multiple channels of communication (which we
call &quot;multiple sockets&quot;). Each socket is identified by an endpoint (can be
omitted).</p>

<h3 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;">(<code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">0</code>) Disconnect</h3>

<p style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Signals disconnection. If no endpoint is specified, disconnects the entire
socket.</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Examples:</p>

<ul style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:30px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;"><li style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">
<p style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Disconnect a socket connected to the <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">/test</code> endpoint.</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">0::/test</p>
</li><li style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">
<p style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Disconnect the whole socket</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">0</p>
</li></ul><h3 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;">(<code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">1</code>) Connect</h3>

<p style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Only used for multiple sockets. Signals a connection to the endpoint.
Once the server receives it, it's echoed back to the client.</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Example, if the client is trying to connect to the endpoint /test, a message
like this will be delivered:</p>

<pre style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:6px;padding-right:10px;padding-bottom:6px;padding-left:10px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:13px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:19px;background-color:rgb(248, 248, 248);border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);overflow-x:auto;overflow-y:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;"><code style="background-image:initial;background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:pre;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-width:initial;background-attachment:initial;background-position-x:initial;background-position-y:initial;background-origin:initial;background-clip:initial;">'1::' [path] [query]
</code></pre>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Example:</p>

<pre style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:6px;padding-right:10px;padding-bottom:6px;padding-left:10px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:13px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:19px;background-color:rgb(248, 248, 248);border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);overflow-x:auto;overflow-y:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;"><code style="background-image:initial;background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:pre;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-width:initial;background-attachment:initial;background-position-x:initial;background-position-y:initial;background-origin:initial;background-clip:initial;">1::/test?my=param
</code></pre>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">To acknowledge the connection, the server echoes back the message. Otherwise,
the server might want to respond with a error packet.</p>

<h3 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;">(<code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">2</code>) Heartbeat</h3>

<p style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Sends a heartbeat. Heartbeats must be sent within the interval negotiated with
the server. It's up to the client to decide the padding (for example, if the
heartbeat timeout negotiated with the server is 20s, the client might want to
send a heartbeat evert 15s).</p>

<h3 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;">(<code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">3</code>) Message</h3>

<pre style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:6px;padding-right:10px;padding-bottom:6px;padding-left:10px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:13px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:19px;background-color:rgb(248, 248, 248);border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);overflow-x:auto;overflow-y:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;"><code style="background-image:initial;background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:pre;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-width:initial;background-attachment:initial;background-position-x:initial;background-position-y:initial;background-origin:initial;background-clip:initial;">'3:' [message id ('+')] ':' [message endpoint] ':' [data]
</code></pre>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">A regular message.</p>

<pre style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:6px;padding-right:10px;padding-bottom:6px;padding-left:10px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:13px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:19px;background-color:rgb(248, 248, 248);border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);overflow-x:auto;overflow-y:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;"><code style="background-image:initial;background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:pre;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-width:initial;background-attachment:initial;background-position-x:initial;background-position-y:initial;background-origin:initial;background-clip:initial;">3:1::blabla
</code></pre>

<h3 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;">(<code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">4</code>) JSON Message</h3>

<pre style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:6px;padding-right:10px;padding-bottom:6px;padding-left:10px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:13px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:19px;background-color:rgb(248, 248, 248);border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);overflow-x:auto;overflow-y:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;"><code style="background-image:initial;background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:pre;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-width:initial;background-attachment:initial;background-position-x:initial;background-position-y:initial;background-origin:initial;background-clip:initial;">'4:' [message id ('+')] ':' [message endpoint] ':' [json]
</code></pre>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">A JSON encoded message.</p>

<pre style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:6px;padding-right:10px;padding-bottom:6px;padding-left:10px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:13px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:19px;background-color:rgb(248, 248, 248);border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);overflow-x:auto;overflow-y:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;"><code style="background-image:initial;background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:pre;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-width:initial;background-attachment:initial;background-position-x:initial;background-position-y:initial;background-origin:initial;background-clip:initial;">4:1::{&quot;a&quot;:&quot;b&quot;}
</code></pre>

<h3 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;">(<code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">5</code>) Event</h3>

<pre style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:6px;padding-right:10px;padding-bottom:6px;padding-left:10px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:13px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:19px;background-color:rgb(248, 248, 248);border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);overflow-x:auto;overflow-y:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;"><code style="background-image:initial;background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:pre;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-width:initial;background-attachment:initial;background-position-x:initial;background-position-y:initial;background-origin:initial;background-clip:initial;">'5:' [message id ('+')] ':' [message endpoint] ':' [json encoded event]
</code></pre>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">An event is like a json message, but has mandatory <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">name</code> and <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">args</code> fields.
<code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">name</code> is a string and <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">args</code> an array.</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">The event names</p>

<pre style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:6px;padding-right:10px;padding-bottom:6px;padding-left:10px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:13px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:19px;background-color:rgb(248, 248, 248);border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);overflow-x:auto;overflow-y:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;"><code style="background-image:initial;background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:pre;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-width:initial;background-attachment:initial;background-position-x:initial;background-position-y:initial;background-origin:initial;background-clip:initial;">'message'
'connect'
'disconnect'
'open'
'close'
'error'
'retry'
'reconnect'
</code></pre>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">are reserved, and cannot be used by clients or servers with this message type.</p>

<h3 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;">(<code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">6</code>) ACK</h3>

<pre style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:6px;padding-right:10px;padding-bottom:6px;padding-left:10px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:13px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:19px;background-color:rgb(248, 248, 248);border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);overflow-x:auto;overflow-y:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;"><code style="background-image:initial;background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:pre;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-width:initial;background-attachment:initial;background-position-x:initial;background-position-y:initial;background-origin:initial;background-clip:initial;">'6:::' [message id] '+' [data]
</code></pre>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">An acknowledgment contains the message id as the message data. If a <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">+</code> sign
follows the message id, it's treated as an event message packet.</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Example 1: simple acknowledgement</p>

<pre style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:6px;padding-right:10px;padding-bottom:6px;padding-left:10px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:13px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:19px;background-color:rgb(248, 248, 248);border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);overflow-x:auto;overflow-y:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;"><code style="background-image:initial;background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:pre;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-width:initial;background-attachment:initial;background-position-x:initial;background-position-y:initial;background-origin:initial;background-clip:initial;">6:::4
</code></pre>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">Example 2: complex acknowledgement</p>

<pre style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:6px;padding-right:10px;padding-bottom:6px;padding-left:10px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:13px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:19px;background-color:rgb(248, 248, 248);border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);overflow-x:auto;overflow-y:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;"><code style="background-image:initial;background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:pre;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-width:initial;background-attachment:initial;background-position-x:initial;background-position-y:initial;background-origin:initial;background-clip:initial;">6:::4+[&quot;A&quot;,&quot;B&quot;]
</code></pre>

<h3 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;">(<code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">7</code>) Error</h3>

<pre style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:6px;padding-right:10px;padding-bottom:6px;padding-left:10px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:13px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:19px;background-color:rgb(248, 248, 248);border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);overflow-x:auto;overflow-y:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;"><code style="background-image:initial;background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:pre;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-width:initial;background-attachment:initial;background-position-x:initial;background-position-y:initial;background-origin:initial;background-clip:initial;">'7::' [endpoint] ':' [reason] '+' [advice]
</code></pre>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">For example, if a connection to a sub-socket is unauthorized.</p>

<h3 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;">(<code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:18px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">8</code>) Noop</h3>

<p style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">No operation. Used for example to close a poll after the polling duration times
out.</p>

<h2 style="background-repeat: initial initial;margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:1px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:24px;font:inherit;font-weight:bold;-webkit-font-smoothing:antialiased;border-bottom-style:solid;border-bottom-color:rgb(204, 204, 204);color:rgb(0, 0, 0);">Forced socket disconnection</h2>

<p style="background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">A Socket.IO server must provide an endpoint to force the disconnection of the
socket.</p>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">While closing the transport connection is enough to trigger a disconnection, it
sometimes is desirable to make sure no timeouts are activated and the
disconnection events fire immediately.</p>

<pre style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:6px;padding-right:10px;padding-bottom:6px;padding-left:10px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:13px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:19px;background-color:rgb(248, 248, 248);border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);overflow-x:auto;overflow-y:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;"><code style="background-image:initial;background-repeat: initial initial;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:pre;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-width:initial;background-attachment:initial;background-position-x:initial;background-position-y:initial;background-origin:initial;background-clip:initial;">http://example.com/socket.io/1/xhr-polling/812738127387123?disconnect
</code></pre>

<p style="background-repeat: initial initial;margin-top:15px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;font-size:14px;font:inherit;">The server must respond with <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">200 OK</code>, or <code style="background-repeat: initial initial;margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-style:initial;border-color:initial;border-image:initial;font-size:12px;font:inherit;font-family:'Bitstream Vera Sans Mono', Courier, monospace;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;white-space:nowrap;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">500</code> if a problem is detected.</p><div style="clear: both"></div></div></div>
</div></body></html> 